<link rel="stylesheet" href="<?php echo Html::cssUrl('redmond.datepick.css') ?> " type="text/css" media="screen" />
<script type="text/javascript" src="<?php echo Html::jsUrl('jquery.datepick.js') ?>"></script>
<script type="text/javascript" src="<?php echo Html::jsUrl('jquery.datepick-vi.js') ?>"></script>


<script type="text/javascript">
    $(function() {
	$('#popupDatepicker').datepick();
	$('#inlineDatepicker').datepick({onSelect: showDate});
});

function showDate(date) {
	alert('The date chosen is ' + date);
}
</script>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'hoc-sinh-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'MaHS'); ?>
		<?php echo $form->textField($model,'MaHS',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'MaHS'); ?>
	</div>

        <div class="row">
            <?php echo $form->labelEx($model, 'MaLop'); ?>
            <?php echo $form->dropDownList($model,'MaLop',  CHtml::listData(Lop::model()->findAll(), 'MaLop', 'MaLop')); ?>
            <?php echo $form->error($model, 'MaLop'); ?>
        </div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'Ho'); ?>
		<?php echo $form->textField($model,'Ho',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'Ho'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Ten'); ?>
		<?php echo $form->textField($model,'Ten',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'Ten'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'GioiTinh'); ?>
		<?php echo $form->textField($model,'GioiTinh'); ?>
		<?php echo $form->error($model,'GioiTinh'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'NgaySinh'); ?>
		<?php echo $form->textField($model,'NgaySinh',array('type'=>'text','id'=>'popupDatepicker')); ?>
		<?php echo $form->error($model,'NgaySinh'); ?>
                <?php /*
                    $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                      'model'=>$model,
                      'attribute'=>'NgaySinh',
                      'value'=>$model->NgaySinh,
                      // additional javascript options for the date picker plugin
                      'options'=>array(
                        'showAnim'=>'fold',
                        'showButtonPanel'=>true,
                        'autoSize'=>true,
                        'dateFormat'=>'dd-mm-yy',
                        'defaultDate'=>$model->NgaySinh,
                       ),
                    ));
                 */
                
                ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'NoiSinh'); ?>
		<?php echo $form->textField($model,'NoiSinh',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'NoiSinh'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DanToc'); ?>
		<?php echo $form->textField($model,'DanToc',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'DanToc'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DiaChi'); ?>
		<?php echo $form->textField($model,'DiaChi',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'DiaChi'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ThuongTru'); ?>
		<?php echo $form->textField($model,'ThuongTru',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'ThuongTru'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'HoTenCha'); ?>
		<?php echo $form->textField($model,'HoTenCha',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'HoTenCha'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'HoTenMe'); ?>
		<?php echo $form->textField($model,'HoTenMe',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'HoTenMe'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DienThoai'); ?>
		<?php echo $form->textField($model,'DienThoai'); ?>
		<?php echo $form->error($model,'DienThoai'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Hinh'); ?>
		<?php echo $form->fileField($model,'Hinh'); ?>
		<?php echo $form->error($model,'Hinh'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->